<!-- 框架的页面 -->
<!DOCTYPE html>
<html>
<head>
    <meta content="text/html;charset=UTF-8"/>
    <title>${env("app.name")}</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta http-equiv="Pragma" content="no-cache"/>
    <meta http-equiv="Cache-Control" content="no cache"/>
    <meta http-equiv="Expires" content="0"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no"/>

    <link rel="stylesheet" type="text/css" href="${ctxPath}/plugins/layui/css/layui.css?v=${jsVer}" media="all"/>
    <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_520106_q8xykrwf86ywrk9.css?v=${jsVer}"
          media="all"/>
    <link rel="stylesheet" type="text/css" href="${ctxPath}/css/fs.css?v=${jsVer}" media="all"/>
    <script type="text/javascript" src="${ctxPath}/plugins/jquery/jquery.min.js?v=${jsVer}"></script>
    <!-- 业务公用库 -->
    <script type="text/javascript" src="${ctxPath}/js/common.js?v=${jsVer}"></script>
    <script type="text/javascript" src="${ctxPath}/js/lib.js?v=${jsVer}"></script>

    <!-- layUI -->
    <script type="text/javascript" src="${ctxPath}/plugins/layui/layui.js?v=${jsVer}"></script>
    <!-- 设置全局变量 -->

    <style>
        #changePwdDiv{display: none}
    </style>

    <script>
        Common.ctxPath = '${ctxPath}';
        Common.version = '${jsVer}';
    </script>
    <script>
        //设定layui模块的版本
        layui.config({
            base: "${ctxPath}/plugins/frame/js/",// 菜单切换等功能
            version: Common.version
        });
        layui.use(['layer','form'], function () {
            var layer = layui.layer;
            var form = layui.form;
            $("#changePwddd").click(function () {
                layer.open({
                    title:'修改密码',
                    type: 1,
                    area: '430px',
                    content: $('#changePwdDiv')
                    ,btn: ['确认', '取消']
                    ,yes: function(index, layero){
                        var pwd = $.trim($("#password").val());
                        var newPwd = $.trim($("#newPassword").val());
                        var retype = $.trim($("#retype").val());
                        if (pwd=="") {
                            Common.info("请输入密码");
                            return false;
                        }
                        if (newPwd=="") {
                            Common.info("请输入新密码");
                            return false;
                        }
                        if (retype!=newPwd) {
                            Common.info("两次输入的新密码不一样");
                            return false;
                        }

                        Lib.submitForm("/core/user/changePassword.json",$("#pwdform"),{},function () {
                            Common.info("修改成功。");
                        });

                    }
                    ,btn2: function(index, layero){
                    }
                });
            })
        });
    </script>


</head>
<body>
<div class="layui-layout layui-layout-admin">
    ${layoutContent}
</div>
<!-- 移动导航 -->
<div class="site-tree-mobile layui-hide">
    <i class="layui-icon">&#xe602;</i>
</div>
<div class="site-mobile-shade"></div>
<div class="layui-hidden">
    <div id="changePwdDiv" style="margin-left: 5px" >
        <form class="layui-form layui-form-pane" id="pwdform" method="post" lay-filter="pwdform">
            <div class="layui-row" style="height: 10px">
            </div>
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">密码</label>
                        <div class="layui-input-inline">
                            <input type="password" name="password" id="password" autocomplete="off" maxlength="50"
                                   class="layui-input"
                                   lay-verify="required">
                        </div>
                    </div>

                </div>
            </div>
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">新密码</label>
                        <div class="layui-input-inline">
                            <input type="password" name="newPassword" id="newPassword" autocomplete="off" maxlength="50"
                                   class="layui-input"
                                   lay-verify="required">
                        </div>
                    </div>

                </div>
            </div>
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">密码确认</label>
                        <div class="layui-input-inline">
                            <input type="password" name="retype" id="retype" autocomplete="off" maxlength="50"
                                   class="layui-input"
                                   lay-verify="required">
                        </div>
                    </div>

                </div>
            </div>
        </form>
    </div>
</div>
</body>
</html>


<script type="text/javascript" src="${ctxPath}/plugins/frame/js/main.js?v=${jsVer}"></script>